#pragma once 

#include "resource_handle.hpp"

namespace winboost {
   namespace resources {

struct deleter_cursor
{
   void operator()(HCURSOR h)  { ::DestroyCursor(h); }
};

class cursor : public resource_handle<HICON__> // HCURSOR = HICON
{
public:
   void set_std_cursor(LPCTSTR val)
   {
      assert(val);
      m_handle = handle_type(::LoadCursor(NULL, val), deleter_cursor());
   }

private:
   virtual void set_id_impl(LPCTSTR ids, HINSTANCE hinst)
   {
      m_handle = handle_type(::LoadCursor(hinst, ids), deleter_cursor());
   }
};

   }
}
